/**
 * CopyRight © 2012 USTC SINOVATE SOFTWARE CO.LTD All Rights Reserved.
 */

package com.cmcc.zysoft.infocollection.mobile.dao;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import com.cmcc.zysoft.infocollection.model.ResourceProperty;
import com.starit.common.dao.hibernate.HibernateBaseDaoImpl;

/**
 * @author 袁凤建
 * <br />邮箱: yuan.fengjian@ustcinfo.com
 * <br />描述: ResourcePropertyDao.java
 * <br />版本: 1.0.0
 * <br />日期: 2013-8-8 下午5:28:14
 * <br />CopyRight © 2012 USTC SINOVATE SOFTWARE CO.LTD All Rights Reserved.
 */

@Repository
public class MResourcePropertyDao extends HibernateBaseDaoImpl<ResourceProperty, String> {

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	/**
	 * 模板字段是否必填接口-通过该接口，可以返回行业模板中的字段是否为必填
	 * @param industryId 行业ID
	 * @return List<Map<String, Object>>
	 */
	public List<Map<String, Object>> getTemplate(String industryId) {
		String sql = "SELECT a.resource_property_enname, a.resource_property_flag FROM tb_c_resource_property a WHERE a.industry_id = ?";
		return this.jdbcTemplate.queryForList(sql, industryId);
	}
}